home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-03-14 | 5.4 KB | 328 lines | [TEXT/MPS ] |
- /*
- * fgrep.r
- *
- * Franklin Chen
- */
-
- #include "SysTypes.r"
- #include "Cmdo.r"
-
- resource 'vers' (1) {
- 0x1,
- 0x1,
- release,
- 0x0,
- verUS,
- "1.1",
- "1.1 © 1989 FSF, Inc.\nMPW port by Franklin Chen"
- };
-
- resource 'vers' (2) {
- 0x1,
- 0x1,
- release,
- 0x0,
- verUS,
- "1.1",
- "GNU for MPW"
- };
-
- resource 'cmdo' (128) {
- { /* array dialogs: 2 elements */
- /* [1] */
- 299,
- "fgrep -- GNU fgrep prints lines matchin"
- "g an expression.",
- { /* array itemArray: 19 elements */
- /* [1] */
- Or {
- { /* array OrArray: 1 elements */
- /* [1] */
- -2
- }
- },
- RegularEntry {
- "Expression",
- {68, 17, 85, 94},
- {68, 97, 85, 332},
- "",
- keepCase,
- "-e",
- "Search for the expression entere"
- "d here."
- },
- /* [2] */
- Or {
- { /* array OrArray: 1 elements */
- /* [1] */
- -1
- }
- },
- Files {
- InputFile,
- OptionalFile {
- {22, 184, 38, 287},
- {37, 183, 56, 310},
- "Expression file",
- "",
- "-f",
- "",
- "Search for the expression contained in t"
- "his file.",
- dim,
- "Use command line",
- "Use expression in file…",
- ""
- },
- Additional {
- "",
- "",
- "",
- "",
- { /* array TypesArray: 1 elements */
- /* [1] */
- text
- }
- }
- },
- /* [3] */
- NotDependent {
-
- },
- MultiFiles {
- "Files to search…",
- "Select the files to search. If none is s"
- "elected, standard input will be searched"
- ".",
- {18, 18, 37, 145},
- "Files that will be searched:",
- "",
- MultiInputFiles {
- { /* array MultiTypesArray: 1 elements */
- /* [1] */
- text
- },
- "",
- "",
- ""
- }
- },
- /* [4] */
- NotDependent {
-
- },
- Redirection {
- StandardOutput,
- {11, 349}
- },
- /* [5] */
- NotDependent {
-
- },
- Redirection {
- DiagnosticOutput,
- {52, 349}
- },
- /* [6] */
- NotDependent {
-
- },
- CheckOption {
- NotSet,
- {97, 12, 113, 155},
- "MPW-style",
- "-m",
- "Use MPW-style filename and line number o"
- "utput."
- },
- /* [7] */
- NotDependent {
-
- },
- CheckOption {
- NotSet,
- {124, 12, 140, 147},
- "Version",
- "-V",
- "Print the version number of this release"
- " on diagnostic output."
- },
- /* [8] */
- And{{-14,-16,-17}},
- CheckOption {
- NotSet,
- {152, 12, 168, 149},
- "Byte offsets",
- "-b",
- "Print every match preceded by its byte o"
- "ffset."
- },
- /* [9] */
- And{{-14,-16,-17}},
- CheckOption {
- NotSet,
- {170, 12, 186, 152},
- "Line numbers",
- "-n",
- "Print each match preceded by its line nu"
- "mber."
- },
- /* [10] */
- NotDependent {
-
- },
- CheckOption {
- NotSet,
- {97, 153, 113, 285},
- "Ignore case",
- "-i",
- "Ignore case difference when comparing st"
- "rings."
- },
- /* [11] */
- Or{{-14}},
- CheckOption {
- NotSet,
- {134, 153, 150, 304},
- "Nonmatches only",
- "-v",
- "Print only lines that contain no matches"
- " for the expression."
- },
- /* [12] */
- And{{-14,-13}},
- CheckOption {
- NotSet,
- {152, 153, 168, 311},
- "Word matches only",
- "-w",
- "Print only lines where the match is a co"
- "mplete word."
- },
- /* [13] */
- And{{-14,-12}},
- CheckOption {
- NotSet,
- {170, 153, 186, 311},
- "Line matches only",
- "-x",
- "Print only lines where the match is a wh"
- "ole line."
- },
- /* [14] */
- And{{-8, -9, -11, -12, -13, -15, -16, -17, -18}},
- CheckOption {
- NotSet,
- {97, 316, 113, 451},
- "Silent",
- "-s",
- "Run silently producing no output except "
- "error messages."
- },
- /* [15] */
- And{{-14,-16}},
- CheckOption {
- NotSet,
- {134, 316, 150, 464},
- "No filenames",
- "-h",
- "Don't display filenames on matches."
- },
- /* [16] */
- And{{-14,-15,-18,-8,-9}},
- CheckOption {
- NotSet,
- {152, 316, 168, 447},
- "Filenames only",
- "-l",
- "Only list files containing matches."
- },
- /* [17] */
- And{{-14,-18,-8,-9}},
- CheckOption {
- NotSet,
- {170, 316, 186, 448},
- "Total counts only",
- "-c",
- "Only print a total count of matching lines."
- },
- /* [18] */
- NotDependent {
-
- },
- NestedDialog {
- 2,
- {41, 17, 59, 145},
- "Context options…",
- "Options for context display may be set w"
- "ith this button."
- },
- /* [19] */
- Or {
- { /* array OrArray: 2 elements */
- /* [1] */
- 1,
- /* [2] */
- 2
- }
- },
- DoItButton {
-
- }
- },
- /* [2] */
- 197,
- "Use this dialog to set context options.",
- { /* array itemArray: 3 elements */
- /* [1] */
- And{{-3,-4}},
- RegularEntry {
- "Lines after:",
- {20, 22, 39, 104},
- {20, 130, 35, 179},
- "",
- keepCase,
- "-A",
- "Print <num> lines of context after every"
- " matching line."
- },
- /* [2] */
- And{{-3,-4}},
- RegularEntry {
- "Lines before:",
- {45, 22, 67, 116},
- {45, 130, 60, 179},
- "",
- keepCase,
- "-B",
- "Print <num> lines of context before ever"
- "y matching line."
- },
- /* [3] */
- And{{-1,-2,-4}},
- RegularEntry {
- "Lines before and after:",
- {70, 22, 92, 180},
- {70, 195, 85, 244},
- "",
- keepCase,
- "",
- "Print <num> lines of context on each side of every match.\n"
- "NOTE: prefix <num> by '-' so that this will be recognized"
- " as an option!"
- },
- /* [4] */
- And{{-1,-2,-3}},
- CheckOption {
- NotSet,
- {26, 230, 46, 384},
- "2 lines on each side",
- "-C",
- "Print 2 lines of context on each side of"
- " every match."
- }
- }
- }
- };
-
-